home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mint110s / proto.h < prev    next >
Text File  |  1994-02-11  |  16KB  |  391 lines

  1. /* bios.c */
  2. long ARGS_ON_STACK getmpb P_((void *ptr));
  3. long bconstat P_((int dev));
  4. long bconin P_((int dev));
  5. long bconout P_((int dev, int c));
  6. long ARGS_ON_STACK ubconstat P_((int dev));
  7. long ARGS_ON_STACK ubconin P_((int dev));
  8. long ARGS_ON_STACK ubconout P_((int dev, int c));
  9. long ARGS_ON_STACK rwabs P_((int rwflag, void *buffer, int number, int recno, int dev, long lrecno));
  10. long ARGS_ON_STACK setexc P_((int number, long vector));
  11. long ARGS_ON_STACK tickcal P_((void));
  12. long ARGS_ON_STACK getbpb P_((int dev));
  13. long bcostat P_((int dev));
  14. long ARGS_ON_STACK ubcostat P_((int dev));
  15. long ARGS_ON_STACK mediach P_((int dev));
  16. long ARGS_ON_STACK drvmap P_((void));
  17. long ARGS_ON_STACK kbshift P_((int mode));
  18. long ARGS_ON_STACK bflush P_((void));
  19. void init_bios P_((void));
  20. long ARGS_ON_STACK do_bconin P_((int dev));
  21. int checkkeys P_((void));
  22. void init_vectors P_((void));
  23. void unlink_vectors  P_((long start, long end));
  24.  
  25. /* xbios.c */
  26. long ARGS_ON_STACK supexec P_((Func funcptr, long a1, long a2, long a3, long a4, long a5));
  27. long ARGS_ON_STACK midiws P_((int, const char *));
  28. int mapin P_((int));
  29. long ARGS_ON_STACK uiorec P_((int));
  30. long ARGS_ON_STACK rsconf P_((int, int, int, int, int, int));
  31. long ARGS_ON_STACK bconmap P_((int));
  32. long ARGS_ON_STACK cursconf P_((int, int));
  33. long ARGS_ON_STACK dosound P_((const char *ptr));
  34. void init_xbios P_((void));
  35.  
  36. /* console.c */
  37. long file_instat P_((FILEPTR *f));
  38. long file_outstat P_((FILEPTR *f));
  39. long file_getchar P_((FILEPTR *f, int mode));
  40. long file_putchar P_((FILEPTR *f, long c, int mode));
  41. long ARGS_ON_STACK c_conin P_((void));
  42. long ARGS_ON_STACK c_conout P_((int c));
  43. long ARGS_ON_STACK c_auxin P_((void));
  44. long ARGS_ON_STACK c_auxout P_((int c));
  45. long ARGS_ON_STACK c_prnout P_((int c));
  46. long ARGS_ON_STACK c_rawio P_((int c));
  47. long ARGS_ON_STACK c_rawcin P_((void));
  48. long ARGS_ON_STACK c_necin P_((void));
  49. long ARGS_ON_STACK c_conws P_((const char *str));
  50. long ARGS_ON_STACK c_conrs P_((char *buf));
  51. long ARGS_ON_STACK c_conis P_((void));
  52. long ARGS_ON_STACK c_conos P_((void));
  53. long ARGS_ON_STACK c_prnos P_((void));
  54. long ARGS_ON_STACK c_auxis P_((void));
  55. long ARGS_ON_STACK c_auxos P_((void));
  56. long ARGS_ON_STACK f_instat P_((int fh));
  57. long ARGS_ON_STACK f_outstat P_((int fh));
  58. long ARGS_ON_STACK f_getchar P_((int fh, int mode));
  59. long ARGS_ON_STACK f_putchar P_((int fh, long c, int mode));
  60.  
  61. /* dos.c */
  62. long ARGS_ON_STACK s_version P_((void));
  63. long ARGS_ON_STACK s_uper P_((long new_ssp));
  64. long ARGS_ON_STACK t_getdate P_((void));
  65. long ARGS_ON_STACK t_setdate P_((int date));
  66. long ARGS_ON_STACK t_gettime P_((void));
  67. long ARGS_ON_STACK t_settime P_((int time));
  68. long ARGS_ON_STACK s_yield P_((void));
  69. long ARGS_ON_STACK p_renice P_((int pid, int delta));
  70. long ARGS_ON_STACK p_nice P_((int delta));
  71. long ARGS_ON_STACK p_getpid P_((void));
  72. long ARGS_ON_STACK p_getppid P_((void));
  73. long ARGS_ON_STACK p_getpgrp P_((void));
  74. long ARGS_ON_STACK p_setpgrp P_((int pid, int newgrp));
  75. long ARGS_ON_STACK p_getuid P_((void));
  76. long ARGS_ON_STACK p_getgid P_((void));
  77. long ARGS_ON_STACK p_geteuid P_((void));
  78. long ARGS_ON_STACK p_getegid P_((void));
  79. long ARGS_ON_STACK p_setuid P_((int id));
  80. long ARGS_ON_STACK p_setgid P_((int id));
  81. long ARGS_ON_STACK p_usrval P_((long arg));
  82. long ARGS_ON_STACK p_umask P_((unsigned mode));
  83. long ARGS_ON_STACK p_domain P_((int arg));
  84. long ARGS_ON_STACK p_rusage P_((long *r));
  85. long ARGS_ON_STACK p_setlimit P_((int i, long v));
  86. long ARGS_ON_STACK p_pause P_((void));
  87. long ARGS_ON_STACK t_alarm P_((long x));
  88. long ARGS_ON_STACK t_malarm P_((long x));
  89. long ARGS_ON_STACK s_ysconf P_((int which));
  90. long ARGS_ON_STACK s_alert P_((char *msg));
  91. void init_dos P_((void));
  92.  
  93. /* dosdir.c */
  94. long ARGS_ON_STACK d_setdrv P_((int d));
  95. long ARGS_ON_STACK d_getdrv P_((void));
  96. long ARGS_ON_STACK d_free P_((long *buf, int d));
  97. long ARGS_ON_STACK d_create P_((const char *path));
  98. long ARGS_ON_STACK d_delete P_((const char *path));
  99. long ARGS_ON_STACK d_setpath P_((const char *path));
  100. long ARGS_ON_STACK d_getpath P_((char *path, int drv));
  101. long ARGS_ON_STACK d_getcwd P_((char *path, int drv, int size));
  102. long ARGS_ON_STACK f_setdta P_((DTABUF *dta));
  103. long ARGS_ON_STACK f_getdta P_((void));
  104. long ARGS_ON_STACK f_sfirst P_((const char *path, int attrib));
  105. long ARGS_ON_STACK f_snext P_((void));
  106. long ARGS_ON_STACK f_attrib P_((const char *name, int rwflag, int attr));
  107. long ARGS_ON_STACK f_delete P_((const char *name));
  108. long ARGS_ON_STACK f_rename P_((int junk, const char *old, const char *new));
  109. long ARGS_ON_STACK d_pathconf P_((const char *name, int which));
  110. long ARGS_ON_STACK d_opendir P_((const char *path, int flags));
  111. long ARGS_ON_STACK d_readdir P_((int len, long handle, char *buf));
  112. long ARGS_ON_STACK d_rewind P_((long handle));
  113. long ARGS_ON_STACK d_closedir P_((long handle));
  114. long ARGS_ON_STACK f_xattr P_((int flag, const char *name, XATTR *xattr));
  115. long ARGS_ON_STACK f_link P_((const char *old, const char *new));
  116. long ARGS_ON_STACK f_symlink P_((const char *old, const char *new));
  117. long ARGS_ON_STACK f_readlink P_((int buflen, char *buf, const char *linkfile));
  118. long ARGS_ON_STACK d_cntl P_((int cmd, const char *name, long arg));
  119. long ARGS_ON_STACK f_chown P_((const char *name, int uid, int gid));
  120. long ARGS_ON_STACK f_chmod P_((const char *name, unsigned mode));
  121. long ARGS_ON_STACK d_lock P_((int mode, int drv));
  122.  
  123. /* dosfile.c */
  124. FILEPTR * do_open P_((const char *name, int mode, int attr, XATTR *x));
  125. long do_pclose P_((PROC *p, FILEPTR *f));
  126. long do_close P_((FILEPTR *f));
  127. long ARGS_ON_STACK f_open P_((const char *name, int mode));
  128. long ARGS_ON_STACK f_create P_((const char *name, int attrib));
  129. long ARGS_ON_STACK f_close P_((int fh));
  130. long ARGS_ON_STACK f_read P_((int fh, long count, char *buf));
  131. long ARGS_ON_STACK f_write P_((int fh, long count, const char *buf));
  132. long ARGS_ON_STACK f_seek P_((long place, int fh, int how));
  133. long ARGS_ON_STACK f_dup P_((int fh));
  134. long ARGS_ON_STACK f_force P_((int newh, int oldh));
  135. long ARGS_ON_STACK f_datime P_((short *timeptr, int fh, int rwflag));
  136. long ARGS_ON_STACK f_lock P_((int fh, int mode, long start, long length));
  137. long ARGS_ON_STACK f_pipe P_((short *usrh));
  138. long ARGS_ON_STACK f_cntl P_((int fh, long arg, int cmd));
  139. long ARGS_ON_STACK f_select P_((unsigned timeout, long *rfdp, long *wfdp, long *xfdp));
  140. long ARGS_ON_STACK f_midipipe P_((int pid, int in, int out));
  141.  
  142. /* dosmem.c */
  143. long ARGS_ON_STACK m_addalt P_((long start, long size));
  144. long _do_malloc P_((MMAP map, long size, int mode));
  145. long ARGS_ON_STACK m_xalloc P_((long size, int mode));
  146. long ARGS_ON_STACK m_alloc P_((long size));
  147. long ARGS_ON_STACK m_free P_((virtaddr block));
  148. long ARGS_ON_STACK m_shrink P_((int dummy, virtaddr block, long size));
  149. long ARGS_ON_STACK p_exec P_((int mode, void *ptr1, void *ptr2, void *ptr3));
  150. long terminate P_((int code, int que));
  151. long ARGS_ON_STACK p_term P_((int code));
  152. long ARGS_ON_STACK p_term0 P_((void));
  153. long ARGS_ON_STACK p_termres P_((long save, int code));
  154. long ARGS_ON_STACK p_waitpid P_((int pid, int nohang, long *rusage));
  155. long ARGS_ON_STACK p_wait3 P_((int nohang, long *rusage));
  156. long ARGS_ON_STACK p_wait P_((void));
  157. long ARGS_ON_STACK p_vfork P_((void));
  158. long ARGS_ON_STACK p_fork P_((void));
  159.  
  160. /* dossig.c */
  161. long ARGS_ON_STACK p_kill P_((int pid, int sig));
  162. long ARGS_ON_STACK p_sigaction P_((int sig, const struct sigaction *act,
  163.              struct sigaction *oact));
  164. long ARGS_ON_STACK p_signal P_((int sig, long handler));
  165. long ARGS_ON_STACK p_sigblock P_((ulong mask));
  166. long ARGS_ON_STACK p_sigsetmask P_((ulong mask));
  167. long ARGS_ON_STACK p_sigpending P_((void));
  168. long ARGS_ON_STACK p_sigpause P_((ulong mask));
  169.  
  170. /* filesys.c */
  171. void init_drive P_((int drv));
  172. void init_filesys P_((void));
  173. void load_filesys P_((void));
  174. void load_devdriver P_((void));
  175. void close_filesys P_((void));
  176. void ARGS_ON_STACK changedrv P_((unsigned drv));
  177. int disk_changed P_((int drv));
  178. long relpath2cookie
  179.     P_((fcookie *dir, const char *path, char *lastnm, fcookie *res, int depth));
  180. long path2cookie P_((const char *path, char *lastname, fcookie *res));
  181. void release_cookie P_((fcookie *fc));
  182. void dup_cookie P_((fcookie *new, fcookie *old));
  183. FILEPTR *new_fileptr P_((void));
  184. void dispose_fileptr P_((FILEPTR *f));
  185. int ARGS_ON_STACK denyshare P_((FILEPTR *list, FILEPTR *newfileptr));
  186. int denyaccess P_((XATTR *, unsigned));
  187. LOCK * ARGS_ON_STACK denylock P_((LOCK *list, LOCK *newlock));
  188. long dir_access P_((fcookie *, unsigned));
  189. int has_wild P_((const char *name));
  190. void copy8_3 P_((char *dest, const char *src));
  191. int pat_match P_((const char *name, const char *template));
  192. int samefile P_((fcookie *, fcookie *));
  193.  
  194. /* main.c */
  195. void restr_intr P_((void));
  196. void ARGS_ON_STACK enter_kernel P_((int));
  197. void ARGS_ON_STACK leave_kernel P_((void));
  198. #if defined(__GNUC__) || defined (__MINT__)
  199. int main P_((int argc, char **argv, char **envp));
  200. #else
  201. int main P_((int argc, char **argv));
  202. #endif
  203. void install_cookies P_((void));
  204. void load_config P_((void));
  205.  
  206. /* mem.c */
  207. void init_mem P_((void));
  208. void restr_screen P_((void));
  209. int add_region P_((MMAP map, ulong place, ulong size, unsigned mflags));
  210. void init_core P_((void));
  211. void init_swap P_((void));
  212. MEMREGION *new_region P_((void));
  213. void dispose_region P_((MEMREGION *m));
  214. long change_prot_status P_((PROC *proc, long start, int newmode));
  215. virtaddr attach_region P_((PROC *proc, MEMREGION *reg));
  216. void detach_region P_((PROC *proc, MEMREGION *reg));
  217. MEMREGION *get_region P_((MMAP map, ulong size, int mode));
  218. void free_region P_((MEMREGION *reg));
  219. long shrink_region P_((MEMREGION *reg, ulong newsize));
  220. long max_rsize P_((MMAP map));
  221. long tot_rsize P_((MMAP map, int flag));
  222. virtaddr alloc_region P_((MMAP map, ulong size, int mode));
  223. MEMREGION *create_env P_((const char *env, ulong flags));
  224. MEMREGION *create_base P_((const char *cmd, MEMREGION *env, ulong flags, ulong prgsize));
  225. MEMREGION *load_region P_((const char *name, MEMREGION *env, const char *cmdlin, XATTR *x,
  226.             MEMREGION **text, long *fp));
  227. MEMREGION *get_text_seg P_((FILEPTR *f, FILEHEAD *fh, XATTR *xp));
  228. long load_and_reloc P_((FILEPTR *f, FILEHEAD *fh, char *where, long start,
  229.             long nbytes, BASEPAGE *base));
  230. void rts P_((void));
  231. PROC *exec_region P_((PROC *p, MEMREGION *mem, int thread));
  232. long memused P_((PROC *p));
  233. void recalc_maxmem P_((PROC *p));
  234. int valid_address P_((long addr));
  235. MEMREGION *addr2region P_((long addr));
  236. void DUMP_ALL_MEM P_((void));
  237. void DUMPMEM P_((MMAP map));
  238. void sanity_check P_((MMAP map));
  239.  
  240. /* proc.c */
  241. PROC *new_proc P_((void));
  242. void dispose_proc P_((PROC *p));
  243. PROC *fork_proc P_((void));
  244. void init_proc P_((void));
  245. void reset_priorities P_((void));
  246. void run_next P_((PROC *p, int slices));
  247. void fresh_slices P_((int slices));
  248. void add_q P_((int que, PROC *proc));
  249. void rm_q P_((int que, PROC *proc));
  250. void ARGS_ON_STACK preempt P_((void));
  251. int ARGS_ON_STACK sleep P_((int que, long cond));
  252. void ARGS_ON_STACK wake P_((int que, long cond));
  253. void ARGS_ON_STACK wakeselect P_((long param));
  254. void DUMPPROC P_((void));
  255.  
  256. /* signal.c */
  257. long killgroup P_((int pgrp, int sig));
  258. void post_sig P_((PROC *p, int sig));
  259. void check_sigs P_((void));
  260. void raise P_((int sig));
  261. void bombs P_((int sig));
  262. void handle_sig P_((int sig));
  263. long ARGS_ON_STACK p_sigreturn P_((void));
  264. void stop P_((int sig));
  265. void exception P_((int sig));
  266. void sigbus P_((void));
  267. void sigaddr P_((void));
  268. void sigill P_((void));
  269. void sigpriv P_((void));
  270. void sigfpe P_((void));
  271. void sigtrap P_((void));
  272. void haltformat P_((void));
  273. void haltcpv P_((void));
  274.  
  275. /* timeout.c */
  276. TIMEOUT * ARGS_ON_STACK addtimeout P_((long delta, void (*func)(PROC *p)));
  277. void ARGS_ON_STACK cancelalltimeouts P_((void));
  278. void ARGS_ON_STACK canceltimeout P_((TIMEOUT *which));
  279. void ARGS_ON_STACK timeout P_((void));
  280. void checkalarms P_((void));
  281. void ARGS_ON_STACK nap P_((unsigned n));
  282.  
  283. /* tty.c */
  284. long tty_read P_((FILEPTR *f, void *buf, long nbytes));
  285. long tty_write P_((FILEPTR *f, const void *buf, long nbytes));
  286. long tty_ioctl P_((FILEPTR *f, int mode, void *arg));
  287. long tty_getchar P_((FILEPTR *f, int mode));
  288. long tty_putchar P_((FILEPTR *f, long data, int mode));
  289.  
  290. /* util.c */
  291. MEMREGION *addr2mem P_((virtaddr a));
  292. PROC *pid2proc P_((int pid));
  293. int newpid P_((void));
  294. void zero P_((char *place, long size));
  295. void * ARGS_ON_STACK kmalloc P_((long size));
  296. void *kcore P_((long size));
  297. void ARGS_ON_STACK kfree P_((void *place));
  298. void * ARGS_ON_STACK umalloc P_((long size));
  299. void ARGS_ON_STACK ufree P_((void *block));
  300. void ARGS_ON_STACK ms_time P_((ulong ms, short *timeptr));
  301. long ARGS_ON_STACK unixtim P_((unsigned time, unsigned date));
  302. long ARGS_ON_STACK dostim P_((long t));
  303. int ARGS_ON_STACK strnicmp P_((const char *str1, const char *str2, int len));
  304. int ARGS_ON_STACK stricmp P_((const char *str1, const char *str2));
  305. char * ARGS_ON_STACK strlwr P_((char *s));
  306. char * ARGS_ON_STACK strupr P_((char *s));
  307.  
  308. #ifdef OWN_LIB
  309. int strncmp P_((const char *str1, const char *str2, int len));
  310. int strcmp P_((const char *str1, const char *str2));
  311. char *strcat P_((char *, const char *));
  312. char *strcpy P_((char *, const char *));
  313. char *strncpy P_((char *, const char *, int));
  314. int strlen P_((const char *));
  315. char *strrchr P_((const char *, int));
  316. int toupper P_((int));
  317. int tolower P_((int));
  318. long atol P_((const char *));
  319. #endif /* OWN_LIB */
  320.  
  321. /* biosfs.c */
  322. void biosfs_init P_((void));
  323. void ARGS_ON_STACK mouse_handler P_((const char *buf));
  324. long ARGS_ON_STACK nocreat P_((fcookie *dir, const char *name, unsigned mode, int attrib,
  325.          fcookie *fc));
  326. long ARGS_ON_STACK nomkdir    P_((fcookie *dir, const char *name, unsigned mode));
  327. long ARGS_ON_STACK nowritelabel P_((fcookie *dir, const char *name));
  328. long ARGS_ON_STACK noreadlabel P_((fcookie *dir, char *name, int namelen));
  329. long ARGS_ON_STACK nosymlink P_((fcookie *dir, const char *name, const char *to));
  330. long ARGS_ON_STACK noreadlink P_((fcookie *dir, char *buf, int buflen));
  331. long ARGS_ON_STACK nohardlink P_((fcookie *, const char *, fcookie *, const char *));
  332. long ARGS_ON_STACK nofscntl P_((fcookie *dir, const char *name, int cmd, long arg));
  333. long ARGS_ON_STACK nodskchng P_((int drv));
  334. int set_auxhandle P_((PROC *, int));
  335.  
  336. /* pipefs.c */
  337.  
  338. /* procfs.c */
  339.  
  340. /* tosfs.c */
  341.  
  342. /* unifs.c */
  343. FILESYS *get_filesys P_((int));
  344. void unifs_init P_((void));
  345.  
  346. /* debug.c */
  347. int ARGS_ON_STACK ksprintf P_((char *, const char *, ...));
  348. void debug_ws P_((const char *s));
  349. int _ALERT P_((char *));
  350. void ARGS_ON_STACK Tracelow P_((const char *s, ...));
  351. void ARGS_ON_STACK Trace P_((const char *s, ...));
  352. void ARGS_ON_STACK Debug P_((const char *s, ...));
  353. void ARGS_ON_STACK ALERT P_((const char *s, ...));
  354. void ARGS_ON_STACK FORCE P_((const char *s, ...));
  355. void PAUSE P_((void));
  356. EXITING void ARGS_ON_STACK FATAL P_((const char *s, ...));
  357. EXITING void HALT P_((void));
  358. void DUMPLOG P_((void));
  359. void do_func_key P_((int));
  360.  
  361. /* rendez.c */
  362. long ARGS_ON_STACK p_msg P_((int mode, long ARGS_ON_STACK mbid, char *ptr));
  363. long ARGS_ON_STACK p_semaphore P_((int mode, long ARGS_ON_STACK id, long timeout));
  364. void free_semaphores P_((int pid));
  365.  
  366. /* memprot.c */
  367. void init_tables P_((void));
  368. int get_prot_mode P_((MEMREGION *));
  369. void mark_region P_((MEMREGION *region, int mode));
  370. void mark_proc_region P_((PROC *proc, MEMREGION *region, int mode));
  371. int prot_temp P_((ulong loc, ulong len, int mode));
  372. void init_page_table P_((PROC *proc));
  373. void mem_prot_special P_((PROC *proc));
  374. void QUICKDUMP P_((void));
  375. void report_buserr P_((void));
  376. void BIG_MEM_DUMP P_((int bigone, PROC *proc));
  377. int mem_access_for P_((PROC *p, ulong where, long len));
  378.  
  379. /* nalloc2.c */
  380. void nalloc_arena_add P_((void *start, long len));
  381. void *nalloc P_((long size));
  382. void nfree P_((void *start));
  383. void NALLOC_DUMP P_((void));
  384.  
  385. /* realloc.c */
  386. long realloc_region P_((MEMREGION *, long));
  387. long ARGS_ON_STACK s_realloc P_((long));
  388.  
  389. /* welcome.c */
  390. int boot_kernel_p P_((void));
  391.